{% include "header.html"%}
<div class="container" id="user-app">
  <div class="row user-form">
    <table class="table table-bordered table-striped">
      <tr>
          <td>用户名</td>
          <td>邮箱</td>
          <td>角色</td>
          <td>操作</td>
      </tr>
      {% for user in users %}
      <tr>
        <td>{{ user.Username }}</td>
        <td>{{ user.Mail }}</td>
        <td>
            {%if user.Role == 3%}超级管理员{%endif%}
            {%if user.Role == 2%}管理员{%endif%}
            {%if user.Role == 1%}审计员{%endif%}
            {%if user.Role == 0%}普通用户{%endif%}
        </td>
        <td>
          <a class="btn btn-sm btn-primary" href="/user-edit/{{ user.Id }}">修改</a>
          <button class="btn btn-danger btn-sm" onclick="doDeleteUser({{user.Id}})">删除</button>
        </td>
      </tr>
      {% endfor %}
    </table>
  </div>
  </div>
{% include "footer.html" %}
